/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.team4.AdvancedAlgorithm.UI;

/**
 *
 * @author HIENPHAM
 */
import javax.swing.*;  
import javax.swing.table.*;  
import java.awt.*;  
   
class MyTableCellRender extends DefaultTableCellRenderer {  
   
public MyTableCellRender() {  
setOpaque(true);  
}  
   
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {  
 
    if(row == 0){   
       setForeground(Color.black);  
       setBackground(Color.CYAN);   
    } 
    else {
       setForeground(Color.black);  
       setBackground(Color.white); 
    }
 setText(value !=null ? value.toString() : "");  
return this;  
}  
}